package com.jdls.pojo;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.Arrays;

/**
 * @author 嘉德罗斯
 * @date 2021/9/18
 */
@Configuration
@ConfigurationProperties(prefix = "student")
public class Student {
    private String name;
    private Integer age;
    private String[] hobby;

    public Student() {
    }

    public Student(String name, Integer age, String[] hobby) {

        this.name = name;
        this.age = age;
        this.hobby = hobby;
    }

    public String getName() {

        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String[] getHobby() {
        return hobby;
    }

    public void setHobby(String[] hobby) {
        this.hobby = hobby;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", hobby=" + Arrays.toString(hobby) +
                '}';
    }
}
